package ru.spb.osll.myfit.client.widget;

import com.google.gwt.user.client.ui.Image;

/**
 * Created by IntelliJ IDEA.
 * User: Victor
 * Date: 02.05.11
 * Time: 21:26
 * To change this template use File | Settings | File Templates.
 */
public class VerifierImage extends Image {

    public enum VerifierState {ERROR, OK};

    private static final String OK_URL = "/images/verifyOK.png";
    private static final String ERROR_URL  = "/images/verifyERROR.png";

    public VerifierImage(){
    }

    public void setState(VerifierState state){
        switch (state){
            case OK:
              setUrl(OK_URL);
              break;
            case ERROR:
              setUrl(ERROR_URL);
              break;
        }
    }
    

}
